package com.group.zsxm.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.swing.JSpinner.ListEditor;
import javax.swing.text.DefaultEditorKit.InsertBreakAction;

import org.springframework.stereotype.Service;

import com.group.zsxm.exception.BusException;
import com.group.zsxm.service.common.BaseService;
import com.sun.swing.internal.plaf.metal.resources.metal;

@Service
public class DwsbService extends BaseService{
	
	/**
	 * 获取所有的季报
	 * @return
	 */
	public List getDwsbList(){
		String sql = " select dm,mc from dwsb where len(dm)=4 order by dm desc ";
		List list = this.getSimpleJdbcTemplate().queryForList(sql);
		return list;
	}
	 
	 
	 /**
	  * 获取有效的当前单位季报
	  * @return
	  */
	 public List getDwsbListByDwid(String dwid){
		 String sql = " select dm,mc from dwsb where len(dm)=4 and  substring(dm,1,4) in ( select distinct substring(dm,1,4) from dwsb_mx where dwid ='"+dwid+"') order by dm desc ";
		List list = this.getSimpleJdbcTemplate().queryForList(sql);
		return list;
	 }
	public List getDwsblxList(){
		String sql = " select * from dwsb1_lx order by dm ";
		List list = this.getSimpleJdbcTemplate().queryForList(sql);
		return list;
	}
	
	public Map getDwsbJbxx(String dwid){
		Map m = new HashMap();
		String sql = " select count(*) from dwsb a,dwsb_mx b where a.bz=1 and a.dm=b.dm and b.dwid='"+dwid+"'";
		if(this.getSimpleJdbcTemplate().queryForInt(sql) > 0){
			sql = " select (select mc from dwsb where dm=substring(a.dm,1,4)) mc," +
			"(select sm from dwsb where dm=substring(a.dm,1,4)) sm," +
			"b.bz,b.yy from dwsb a,dwsb_mx b where a.bz=1 and a.dm=b.dm and b.dwid='"+dwid+"'";
			m = this.getSimpleJdbcTemplate().queryForMap(sql);
		}
		
		return m;
	}
	
	public Map preDwsb1(String dwid,String sbdm){
		Map m = new HashMap();
		String sql = "";
		sql = " select count(*) from dwsb1_info where dwid='"+dwid+"' and sbdm='"+sbdm+"'";
		if(this.getSimpleJdbcTemplate().queryForInt(sql) > 0){
			sql = " select SBDM,DWID,QYMC,QYFRDM,ZCZJ,FZR,FZRDH,convert(varchar,ZCSJ,23) zcsj,LXR,LXRDH,CZ," +
				"QYDJZCLX,ZRQYRS,CDGLGJDFXMS,HYLB,BSRS,GJJXMS,GXJSQY,SSRS,SJXMS,SFSSQY,YJSJYSXLS," +
				"SSJXMS,YFJGS,BKXLS,QJXMS,GXJSCPS,DZXLS,GLGJDFDZJF,GJJXMJF,SJXMJF,SSJXMJF,QJXMJF" +
				",CDGLQYXMS,GLQYXMDZJF,KJHDJFZCZE,YJSYFZZC,XCPKFJFZC,GJZCS,HGJWJZJRS,GJZCHBSRS" +
				",ZRQYZSR,ZRQYGYZCZ,ZRQYJLR,ZRQYSJSJ,ZRQYCKCH,ZBSQTDQKPXS,SQZLS,FMZLS,QZSQZLS,QZFMZLS" +
				",GMGWJSZLS,zzxls,jndxyjsxrs,jnyjbysrs,kjhdrys,qzyjfzrys from dwsb1_info where dwid='"+dwid+"' and sbdm='"+sbdm+"'";
			m = this.getSimpleJdbcTemplate().queryForMap(sql);
		}
		return m;
	}
	
	
	public Map preDwsb2(String dwid,String sbdm){
		Map m = new HashMap();
		String sql = "";
		sql = " select count(*) from dwsb2_info where dwid='"+dwid+"' and sbdm='"+sbdm+"'";
		if(this.getSimpleJdbcTemplate().queryForInt(sql) > 0){
			sql = " select SBDM,DWID,QYMC,ZZJGDM,ZCZJ,FZR,FZRDH,convert(varchar,ZCSJ,23) zcsj,LXR,LXRDH,CZ,YFJGS,JYDLFRZG,SJYSYFJG,RHQYS," +
				"ZRQY,GMYSQY,GXJSQY,SSQY,RHQYGXJSCPS,ZSR,ZZC,JYJLR,SJSJ,CKCH,ZBSQTDQSR,ZYJSRYS,BS,SS,YJSXLJYS,BKXL,DZXL,GJZC,HGRCJWJZJRYS" +
				",GJZCHBSXWRYS,SQZLXS,FMZL,SSQZLXS,SFMZL,GMGWJSZLS,CDGLGJHDFXMS,GJJXM,SJXM,SSJXM,QJXM,GLGJHDFXMDZJF,SGJJXM,SJXM2" +
				",SSJXM2,SQJXM,CDGLQYXMS,GLQYXMDZJF,KJHDJFZCZE,YJYSYFZZC,XCPKFJFZC,zzxls,jndxyjsxrs,jnyjbysrs,kjhdrys,qzyjfzrys from dwsb2_info where dwid='"+dwid+"' and sbdm='"+sbdm+"'";
			m = this.getSimpleJdbcTemplate().queryForMap(sql);
		}
		return m;
	}
	
	
	public Map preDwsb3(String dwid,String sbdm){
		Map m = new HashMap();
		String sql = "";
		sql = " select count(*) from dwsb3_info where dwid='"+dwid+"' and sbdm='"+sbdm+"'";
		if(this.getSimpleJdbcTemplate().queryForInt(sql) > 0){
			sql = " select SBDM,DWID,QYMC,ZZJGDM,ZCZJ,FZR,FZRDH,convert(varchar,ZCSJ,23) zcsj,LXR,LXRDH,CZ,YFJGS,JYDLFRZG,SJYSYFJG,RHQYS," +
				"ZRQY,GMYSQY,GXJSQY,SSQY,RHQYGXJSCPS,ZSR,ZZC,JYJLR,SJSJ,CKCH,ZBSQTDQSR,ZYJSRYS,BS,SS,YJSXLJYS,BKXL,DZXL,GJZC,HGRCJWJZJRYS" +
				",GJZCHBSXWRYS,SQZLXS,FMZL,SSQZLXS,SFMZL,GMGWJSZLS,CDGLGJHDFXMS,GJJXM,SJXM,SSJXM,QJXM,GLGJHDFXMDZJF,SGJJXM,SJXM2" +
				",SSJXM2,SQJXM,CDGLQYXMS,GLQYXMDZJF,KJHDJFZCZE,YJYSYFZZC,XCPKFJFZC,zzxls,jndxyjsxrs,jnyjbysrs,kjhdrys,qzyjfzrys from dwsb3_info where dwid='"+dwid+"' and sbdm='"+sbdm+"'";
			m = this.getSimpleJdbcTemplate().queryForMap(sql);
		}
		return m;
	}
	
	public int doSaveDwsb1(String dwid,String sbdm,Map<String, String> dwsb){
		String sql = "";
		sql = " select isnull(bz,0) from dwsb_mx where dm='"+sbdm+"' and dwid="+dwid;
		Integer bz = this.getSimpleJdbcTemplate().queryForInt(sql);
		if(bz == 5){
			throw new BusException("当前数据已上报，不能修改！");
		}
		
		if(bz == 3){
			throw new BusException("当前数据已审核通过，不能修改！");
		}
		
		Integer status = 0;
		sql = "select count(*) from dwsb1_info where sbdm='"+sbdm+"' and dwid="+dwid;
		if(this.getSimpleJdbcTemplate().queryForInt( sql )>0){
			status = this.getSimpleJdbcTemplate().queryForInt(" select isnull(status,0) from dwsb1_info where sbdm='"+sbdm+"' and dwid="+dwid);
		}
		
		sql = " delete from dwsb1_info where sbdm='"+sbdm+"' and dwid="+dwid;
		this.getSimpleJdbcTemplate().update(sql);

		sql = " insert into dwsb1_info(SBDM,DWID,QYMC,QYFRDM,ZCZJ,FZR,FZRDH,ZCSJ,LXR,LXRDH,CZ," +
				"QYDJZCLX,ZRQYRS,CDGLGJDFXMS,HYLB,BSRS,GJJXMS,GXJSQY,SSRS,SJXMS,SFSSQY,YJSJYSXLS," +
				"SSJXMS,YFJGS,BKXLS,QJXMS,GXJSCPS,DZXLS,GLGJDFDZJF,GJJXMJF,SJXMJF,SSJXMJF,QJXMJF" +
				",CDGLQYXMS,GLQYXMDZJF,KJHDJFZCZE,YJSYFZZC,XCPKFJFZC,GJZCS,HGJWJZJRS,GJZCHBSRS" +
				",ZRQYZSR,ZRQYGYZCZ,ZRQYJLR,ZRQYSJSJ,ZRQYCKCH,ZBSQTDQKPXS,SQZLS,FMZLS,QZSQZLS,QZFMZLS" +
				",GMGWJSZLS,zzxls,jndxyjsxrs,jnyjbysrs,kjhdrys,qzyjfzrys,status) values('"+sbdm+"','"+dwid+"','"+dwsb.get("qymc")+"','"+dwsb.get("qyfrdm")+"','"+transToN(dwsb.get("zczj"))+"'," +
				"'"+dwsb.get("fzr")+"','"+dwsb.get("fzrdh")+"',"+transToD(dwsb.get("zcsj"))+",'"+dwsb.get("lxr")+"','"+dwsb.get("lxrdh")+"'" +
				",'"+dwsb.get("cz")+"','"+dwsb.get("qydjzclx")+"','"+transToN(dwsb.get("zrqyrs"))+"','"+transToN(dwsb.get("cdglgjdfxms"))+"','"+dwsb.get("hylb")+"'" +
				",'"+transToN(dwsb.get("bsrs"))+"','"+transToN(dwsb.get("gjjxms"))+"','"+transToN(dwsb.get("gxjsqy"))+"','"+transToN(dwsb.get("ssrs"))+"','"+transToN(dwsb.get("sjxms"))+"'" +
				",'"+transToN(dwsb.get("sfssqy"))+"','"+transToN(dwsb.get("yjsjysxls"))+"','"+transToN(dwsb.get("ssjxms"))+"','"+transToN(dwsb.get("yfjgs"))+"','"+transToN(dwsb.get("bkxls"))+"'" +
				",'"+transToN(dwsb.get("qjxms"))+"','"+transToN(dwsb.get("gxjscps"))+"','"+transToN(dwsb.get("dzxls"))+"','"+transToN(dwsb.get("glgjdfdzjf"))+"','"+transToN(dwsb.get("gjjxmjf"))+"'" +
				",'"+transToN(dwsb.get("sjxmjf"))+"','"+transToN(dwsb.get("ssjxmjf"))+"','"+transToN(dwsb.get("qjxmjf"))+"','"+transToN(dwsb.get("cdglqyxms"))+"','"+transToN(dwsb.get("glqyxmdzjf"))+"','"+transToN(dwsb.get("kjhdjfzcze"))+"'" +
				",'"+transToN(dwsb.get("yjsyfzzc"))+"','"+transToN(dwsb.get("xcpkfjfzc"))+"','"+transToN(dwsb.get("gjzcs"))+"','"+transToN(dwsb.get("hgjwjzjrs"))+"','"+transToN(dwsb.get("gjzchbsrs"))+"'" +
				",'"+transToN(dwsb.get("zrqyzsr"))+"','"+transToN(dwsb.get("zrqygyzcz"))+"','"+transToN(dwsb.get("zrqyjlr"))+"','"+transToN(dwsb.get("zrqysjsj"))+"','"+transToN(dwsb.get("zrqyckch"))+"'" +
				",'"+transToN(dwsb.get("zbsqtdqkpxs"))+"','"+transToN(dwsb.get("sqzls"))+"','"+transToN(dwsb.get("fmzls"))+"','"+transToN(dwsb.get("qzsqzls"))+"','"+transToN(dwsb.get("qzfmzls"))+"'" +
				",'"+transToN(dwsb.get("gmgwjszls"))+"','"+transToN(dwsb.get("zzxls"))+"','"+transToN(dwsb.get("jndxyjsxrs"))+"'" +
				",'"+transToN(dwsb.get("jnyjbysrs"))+"','"+transToN(dwsb.get("kjhdrys"))+"','"+transToN(dwsb.get("qzyjfzrys"))+"',"+status+")";
		this.getSimpleJdbcTemplate().update(sql);
		return 1;
	}
	
	
	
	public int doSaveDwsb2(String dwid,String sbdm,Map<String, String> dwsb){
		String sql = "";
		sql = " select isnull(bz,0) from dwsb_mx where dm='"+sbdm+"' and dwid="+dwid;
		Integer bz = this.getSimpleJdbcTemplate().queryForInt(sql);
		if(bz == 5){
			throw new BusException("当前数据已上报，不能修改！");
		}
		
		if(bz == 3){
			throw new BusException("当前数据已审核通过，不能修改！");
		}
		
		Integer status = 0;
		sql = "select count(*) from dwsb2_info where sbdm='"+sbdm+"' and dwid="+dwid;
		if(this.getSimpleJdbcTemplate().queryForInt( sql )>0){
			status = this.getSimpleJdbcTemplate().queryForInt(" select isnull(status,0) from dwsb2_info where sbdm='"+sbdm+"' and dwid="+dwid);
		}
		
		sql = " delete from dwsb2_info where sbdm='"+sbdm+"' and dwid="+dwid;
		this.getSimpleJdbcTemplate().update(sql);	
		
		sql = " insert into dwsb2_info(SBDM,DWID,QYMC,ZZJGDM,ZCZJ,FZR,FZRDH,ZCSJ,LXR,LXRDH,CZ,YFJGS,JYDLFRZG,SJYSYFJG,RHQYS," +
				"ZRQY,GMYSQY,GXJSQY,SSQY,RHQYGXJSCPS,ZSR,ZZC,JYJLR,SJSJ,CKCH,ZBSQTDQSR,ZYJSRYS,BS,SS,YJSXLJYS,BKXL,DZXL,GJZC,HGRCJWJZJRYS" +
				",GJZCHBSXWRYS,SQZLXS,FMZL,SSQZLXS,SFMZL,GMGWJSZLS,CDGLGJHDFXMS,GJJXM,SJXM,SSJXM,QJXM,GLGJHDFXMDZJF,SGJJXM,SJxm2" +
				",SSJXM2,SQJXM,CDGLQYXMS,GLQYXMDZJF,KJHDJFZCZE,YJYSYFZZC,XCPKFJFZC,zzxls,jndxyjsxrs,jnyjbysrs,kjhdrys,qzyjfzrys,status)" +
				" values('"+sbdm+"','"+dwid+"','"+dwsb.get("qymc")+"','"+dwsb.get("zzjgdm")+"','"+transToN(dwsb.get("zczj"))+"'," +
				"'"+dwsb.get("fzr")+"','"+dwsb.get("fzrdh")+"',"+transToD(dwsb.get("zcsj"))+",'"+dwsb.get("lxr")+"','"+dwsb.get("lxrdh")+"'" +
				",'"+dwsb.get("cz")+"','"+transToN(dwsb.get("yfjgs"))+"','"+transToN(dwsb.get("jydlfrzg"))+"','"+transToN(dwsb.get("sjysyfjg"))+"','"+dwsb.get("rhqys")+"'" +
				",'"+transToN(dwsb.get("zrqy"))+"','"+transToN(dwsb.get("gmysqy"))+"','"+transToN(dwsb.get("gxjsqy"))+"','"+transToN(dwsb.get("ssqy"))+"'," +
				"'"+transToN(dwsb.get("rhqygxjscps"))+"'" +
				",'"+transToN(dwsb.get("zsr"))+"','"+transToN(dwsb.get("zzc"))+"','"+transToN(dwsb.get("jyjlr"))+"','"+transToN(dwsb.get("sjsj"))+"','"+transToN(dwsb.get("ckch"))+"'" +
				",'"+transToN(dwsb.get("zbsqtdqsr"))+"','"+transToN(dwsb.get("zyjsrys"))+"','"+transToN(dwsb.get("bs"))+"','"+transToN(dwsb.get("ss"))+"','"+transToN(dwsb.get("yjsxljys"))+"'" +
				",'"+transToN(dwsb.get("bkxl"))+"','"+transToN(dwsb.get("dzxl"))+"','"+transToN(dwsb.get("gjzc"))+"','"+transToN(dwsb.get("hgrcjwjzjrys"))+"'," +
				"'"+transToN(dwsb.get("gjzchbsxwrys"))+"','"+transToN(dwsb.get("sqzlxs"))+"'" +
				",'"+transToN(dwsb.get("fmzl"))+"','"+transToN(dwsb.get("ssqzlxs"))+"','"+transToN(dwsb.get("sfmzl"))+"','"+transToN(dwsb.get("gmgwjszls"))+"'," +
				"'"+transToN(dwsb.get("cdglgjhdfxms"))+"'" +
				",'"+transToN(dwsb.get("gjjxm"))+"','"+transToN(dwsb.get("sjxm"))+"','"+transToN(dwsb.get("ssjxm"))+"','"+transToN(dwsb.get("qjxm"))+"','"+transToN(dwsb.get("glgjhdfxmdzjf"))+"'" +
				",'"+transToN(dwsb.get("sgjjxm"))+"','"+transToN(dwsb.get("sjxm2"))+"','"+transToN(dwsb.get("ssjxm2"))+"','"+transToN(dwsb.get("sqjxm"))+"'," +
				"'"+transToN(dwsb.get("cdglqyxms"))+"'" +
				",'"+transToN(dwsb.get("glqyxmdzjf"))+"','"+transToN(dwsb.get("kjhdjfzcze"))+"','"+transToN(dwsb.get("yjysyfzzc"))+"','"+transToN(dwsb.get("xcpkfjfzc"))+"'," +
				"'"+transToN(dwsb.get("zzxls"))+"','"+transToN(dwsb.get("jndxyjsxrs"))+"'" +
				",'"+transToN(dwsb.get("jnyjbysrs"))+"','"+transToN(dwsb.get("kjhdrys"))+"','"+transToN(dwsb.get("qzyjfzrys"))+"',"+status+")";
		this.getSimpleJdbcTemplate().update(sql);
		return 1;
	}
	
	public int doSaveDwsb3(String dwid,String sbdm,Map<String, String> dwsb){
		String sql = "";
		sql = " select isnull(bz,0) from dwsb_mx where dm='"+sbdm+"' and dwid="+dwid;
		Integer bz = this.getSimpleJdbcTemplate().queryForInt(sql);
		if(bz == 5){
			throw new BusException("当前数据已上报，不能修改！");
		}
		
		if(bz == 3){
			throw new BusException("当前数据已审核通过，不能修改！");
		}

		Integer status = 0;
		sql = "select count(*) from dwsb3_info where sbdm='"+sbdm+"' and dwid="+dwid;
		if(this.getSimpleJdbcTemplate().queryForInt( sql )>0){
			status = this.getSimpleJdbcTemplate().queryForInt(" select isnull(status,0) from dwsb3_info where sbdm='"+sbdm+"' and dwid="+dwid);
		}
		
		sql = " delete from dwsb3_info where sbdm='"+sbdm+"' and dwid="+dwid;
		this.getSimpleJdbcTemplate().update(sql);	
		
		sql = " insert into dwsb3_info(SBDM,DWID,QYMC,ZZJGDM,ZCZJ,FZR,FZRDH,ZCSJ,LXR,LXRDH,CZ,YFJGS,JYDLFRZG,SJYSYFJG,RHQYS," +
				"ZRQY,GMYSQY,GXJSQY,SSQY,RHQYGXJSCPS,ZSR,ZZC,JYJLR,SJSJ,CKCH,ZBSQTDQSR,ZYJSRYS,BS,SS,YJSXLJYS,BKXL,DZXL,GJZC,HGRCJWJZJRYS" +
				",GJZCHBSXWRYS,SQZLXS,FMZL,SSQZLXS,SFMZL,GMGWJSZLS,CDGLGJHDFXMS,GJJXM,SJXM,SSJXM,QJXM,GLGJHDFXMDZJF,SGJJXM,SJxm2" +
				",SSJXM2,SQJXM,CDGLQYXMS,GLQYXMDZJF,KJHDJFZCZE,YJYSYFZZC,XCPKFJFZC,zzxls,jndxyjsxrs,jnyjbysrs,kjhdrys,qzyjfzrys,status)" +
				" values('"+sbdm+"','"+dwid+"','"+dwsb.get("qymc")+"','"+dwsb.get("zzjgdm")+"','"+transToN(dwsb.get("zczj"))+"'," +
				"'"+dwsb.get("fzr")+"','"+dwsb.get("fzrdh")+"',"+transToD(dwsb.get("zcsj"))+",'"+dwsb.get("lxr")+"','"+dwsb.get("lxrdh")+"'" +
				",'"+dwsb.get("cz")+"','"+transToN(dwsb.get("yfjgs"))+"','"+transToN(dwsb.get("jydlfrzg"))+"','"+transToN(dwsb.get("sjysyfjg"))+"','"+dwsb.get("rhqys")+"'" +
				",'"+transToN(dwsb.get("zrqy"))+"','"+transToN(dwsb.get("gmysqy"))+"','"+transToN(dwsb.get("gxjsqy"))+"','"+transToN(dwsb.get("ssqy"))+"'," +
				"'"+transToN(dwsb.get("rhqygxjscps"))+"'" +
				",'"+transToN(dwsb.get("zsr"))+"','"+transToN(dwsb.get("zzc"))+"','"+transToN(dwsb.get("jyjlr"))+"','"+transToN(dwsb.get("sjsj"))+"','"+transToN(dwsb.get("ckch"))+"'" +
				",'"+transToN(dwsb.get("zbsqtdqsr"))+"','"+transToN(dwsb.get("zyjsrys"))+"','"+transToN(dwsb.get("bs"))+"','"+transToN(dwsb.get("ss"))+"','"+transToN(dwsb.get("yjsxljys"))+"'" +
				",'"+transToN(dwsb.get("bkxl"))+"','"+transToN(dwsb.get("dzxl"))+"','"+transToN(dwsb.get("gjzc"))+"','"+transToN(dwsb.get("hgrcjwjzjrys"))+"'," +
				"'"+transToN(dwsb.get("gjzchbsxwrys"))+"','"+transToN(dwsb.get("sqzlxs"))+"'" +
				",'"+transToN(dwsb.get("fmzl"))+"','"+transToN(dwsb.get("ssqzlxs"))+"','"+transToN(dwsb.get("sfmzl"))+"','"+transToN(dwsb.get("gmgwjszls"))+"'," +
				"'"+transToN(dwsb.get("cdglgjhdfxms"))+"'" +
				",'"+transToN(dwsb.get("gjjxm"))+"','"+transToN(dwsb.get("sjxm"))+"','"+transToN(dwsb.get("ssjxm"))+"','"+transToN(dwsb.get("qjxm"))+"','"+transToN(dwsb.get("glgjhdfxmdzjf"))+"'" +
				",'"+transToN(dwsb.get("sgjjxm"))+"','"+transToN(dwsb.get("sjxm2"))+"','"+transToN(dwsb.get("ssjxm2"))+"','"+transToN(dwsb.get("sqjxm"))+"'," +
				"'"+transToN(dwsb.get("cdglqyxms"))+"'" +
				",'"+transToN(dwsb.get("glqyxmdzjf"))+"','"+transToN(dwsb.get("kjhdjfzcze"))+"','"+transToN(dwsb.get("yjysyfzzc"))+"'" +
				",'"+transToN(dwsb.get("xcpkfjfzc"))+"'" +
				",'"+transToN(dwsb.get("zzxls"))+"','"+transToN(dwsb.get("jndxyjsxrs"))+"'" +
				",'"+transToN(dwsb.get("jnyjbysrs"))+"','"+transToN(dwsb.get("kjhdrys"))+"','"+transToN(dwsb.get("qzyjfzrys"))+"',"+status+")";
		this.getSimpleJdbcTemplate().update(sql);
		return 1;
	}
	
	/**
	 * 上报
	 * @param sbdm
	 * @param dwid
	 * @return
	 */
	public int doDwsb(String dwid,String sbdm,Integer lxbz){
		String sql = " ";
		sql = " select isnull(bz,0) from dwsb_mx where  dm='"+sbdm+"' and dwid="+dwid;
		Integer bz = this.getSimpleJdbcTemplate().queryForInt(sql);
		if(bz == 5){
			throw new BusException("当前数据已上报！");
		}
		
		sql = " update dwsb_mx set bz=5 where dm='"+sbdm+"' and dwid="+dwid;
		this.getSimpleJdbcTemplate().update(sql);
		
		
		if(lxbz == 1){
			sql = " update dwsb1_info set status=5 where sbdm='"+sbdm+"' and dwid="+dwid;
		}else if(lxbz==2){
			sql = " update dwsb2_info set status=5 where sbdm='"+sbdm+"' and dwid="+dwid;
		}else if(lxbz==3){
			sql = " update dwsb3_info set status=5 where sbdm='"+sbdm+"' and dwid="+dwid;
		}
		this.getSimpleJdbcTemplate().update(sql);
		
		return 1;
	}
}
